<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml" 
      xmlns:th="http://www.thymeleaf.org"
      xmlns:tiles="http://www.thymeleaf.org"
      xmlns:sec="http://www.thymeleaf.org"
      lang="en">

<head>

    <!-- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -->
    <!-- This <head> section is only used for static prototyping purposes. At runtime, -->
    <!-- Tiles will only use the body fragment defined with tiles:fragment="content",  --> 
    <!-- as specified at the corresponding views.xml file.                             -->
    <!-- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -->

    <title>Spring Travel: Spring MVC and Web Flow Reference Application</title>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
    
    <link rel="stylesheet" type="text/css" media="screen, projection" 
          href="../../styles/blueprint/screen.css" />
    
    <link rel="stylesheet" type="text/css" media="print" 
          href="../../styles/blueprint/print.css" />
    
    <!--[if lt IE 8]>
        <link rel="stylesheet" type="text/css" media="screen, projection"
              href="../../styles/blueprint/ie.css" />
    <![endif]-->
    
    <link rel="stylesheet" type="text/css" media="screen" 
          href="../../styles/booking.css" />

    
    <!-- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -  -->
    <!-- Some styles and scripts are served from spring-js-resources-{ver}.jar at -->
    <!-- runtime. Therefore not available for static prototyping. See the         -->
    <!-- layouts/standard.html template file for detail.                          -->
    <!-- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -  -->
    
</head>

<!-- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -->
<!-- START of the content to be included in the execution result.  -->
<!-- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -->
<!-- Only the markup inside this <body> would be required in this  -->
<!-- template if no static prototyping was intended.               -->
<!-- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -->
<body tiles:fragment="content">


<h1>Search Hotels</h1>

<form action="#" th:object="${searchCriteria}" th:action="@{/hotels}" method="get" class="inline">

    <ul th:if="${#fields.hasErrors('*')}" class="errors span-18">
        <li th:each="err : ${#fields.errors('*')}" th:text="${err}">Input is incorrect</li>
    </ul>

    <fieldset>
        <div class="span-8">
            <label for="searchString">Search String:</label>
            <input type="text" id="searchString" th:field="*{searchString}" />
            <script type="text/javascript">
                // <![CDATA[
                Spring.addDecoration(new Spring.ElementDecoration({
                    elementId : "searchString",
                    widgetType : "dijit.form.ValidationTextBox",
                    widgetAttrs : { promptMessage : "Search hotels by name, address, city, or zip." }}));
                // ]]>
            </script>
        </div>
        <div class="span-6">
            <div>
                <label for="pageSize">Maximum results:</label>
                <select id="pageSize" th:field="*{pageSize}">
                    <option label="5" value="5" />
                    <option label="10" value="10" />
                    <option label="20" value="20" />
                </select>
            </div>
        </div>
        <div class="span-3 last">
            <button type="submit">Find Hotels</button>
        </div>      
    </fieldset>
    
</form>


</body>
<!-- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -->
<!-- END of the content to be included in the execution result -->
<!-- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -->

</html>
